

<!DOCTYPE html>
<html lang="zh" data-default-color-scheme=&#34;auto&#34;>



<head>
  <meta charset="UTF-8">
  <link rel="apple-touch-icon" sizes="76x76" href="/walker_sue/img/favicon.png">
  <link rel="icon" type="image/png" href="/walker_sue/img/favicon.png">
  <meta name="viewport"
        content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, shrink-to-fit=no">
  <meta http-equiv="x-ua-compatible" content="ie=edge">
  
  <meta name="theme-color" content="#2f4154">
  <meta name="description" content="">
  <meta name="author" content="lk">
  <meta name="keywords" content="">
  <title>AIRBNB 个性化推荐与信用卡欺诈预测 - Walker_Sue</title>

  <link  rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/4.4.1/css/bootstrap.min.css" />


  <link  rel="stylesheet" href="https://cdn.staticfile.org/github-markdown-css/4.0.0/github-markdown.min.css" />
  <link  rel="stylesheet" href="/walker_sue/lib/hint/hint.min.css" />

  
    
    
      
      <link  rel="stylesheet" href="https://cdn.staticfile.org/highlight.js/10.0.0/styles/github-gist.min.css" />
    
  

  


<!-- 主题依赖的图标库，不要自行修改 -->

<link rel="stylesheet" href="//at.alicdn.com/t/font_1749284_ba1fz6golrf.css">



<link rel="stylesheet" href="//at.alicdn.com/t/font_1736178_kmeydafke9r.css">


<link  rel="stylesheet" href="/walker_sue/css/main.css" />

<!-- 自定义样式保持在最底部 -->


  <script  src="/walker_sue/js/utils.js" ></script>
  <script  src="/walker_sue/js/color-schema.js" ></script>
<meta name="generator" content="Hexo 5.3.0"></head>


<body>
  <header style="height: 70vh;">
    <nav id="navbar" class="navbar fixed-top  navbar-expand-lg navbar-dark scrolling-navbar">
  <div class="container">
    <a class="navbar-brand"
       href="/walker_sue/">&nbsp;<strong>Walker</strong>&nbsp;</a>

    <button id="navbar-toggler-btn" class="navbar-toggler" type="button" data-toggle="collapse"
            data-target="#navbarSupportedContent"
            aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
      <div class="animated-icon"><span></span><span></span><span></span></div>
    </button>

    <!-- Collapsible content -->
    <div class="collapse navbar-collapse" id="navbarSupportedContent">
      <ul class="navbar-nav ml-auto text-center">
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/walker_sue/">
                <i class="iconfont icon-home-fill"></i>
                主页
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/walker_sue/archives/">
                <i class="iconfont icon-archive-fill"></i>
                归档
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/walker_sue/categories/">
                <i class="iconfont icon-category-fill"></i>
                分类
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/walker_sue/tags/">
                <i class="iconfont icon-tags-fill"></i>
                标签
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/walker_sue/about/">
                <i class="iconfont icon-user-fill"></i>
                关于
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item dropdown">
              <a class="nav-link dropdown-toggle" href="#" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                <i class="iconfont icon-books"></i>
                文档
              </a>
              <div class="dropdown-menu" aria-labelledby="navbarDropdown">
                
                  
                  
                  
                  <a class="dropdown-item" target="_blank" rel="noopener" href="https://hexo.fluid-dev.com/">
                    
                    主题博客
                  </a>
                
                  
                  
                  
                  <a class="dropdown-item" target="_blank" rel="noopener" href="https://hexo.fluid-dev.com/docs/guide/">
                    
                    配置指南
                  </a>
                
                  
                  
                  
                  <a class="dropdown-item" target="_blank" rel="noopener" href="https://hexo.fluid-dev.com/docs/icon/">
                    
                    图标用法
                  </a>
                
              </div>
            </li>
          
        
        
          <li class="nav-item" id="search-btn">
            <a class="nav-link" data-toggle="modal" data-target="#modalSearch">&nbsp;<i
                class="iconfont icon-search"></i>&nbsp;</a>
          </li>
        
        
          <li class="nav-item" id="color-toggle-btn">
            <a class="nav-link" href="javascript:">&nbsp;<i
                class="iconfont icon-dark" id="color-toggle-icon"></i>&nbsp;</a>
          </li>
        
      </ul>
    </div>
  </div>
</nav>

    <div class="banner intro-2" id="background" parallax=true
         style="background: url('/walker_sue/img/default.png') no-repeat center center;
           background-size: cover;">
      <div class="full-bg-img">
        <div class="mask flex-center" style="background-color: rgba(0, 0, 0, 0.3)">
          <div class="container page-header text-center fade-in-up">
    <span class="h2" id="subtitle">
    
</span>




<div class="mt-3">
  
  
    <span class="post-meta">
      <i class="iconfont icon-date-fill" aria-hidden="true"></i>
      <time datetime="2021-02-14 13:26" pubdate>
        February 14, 2021 pm
      </time>
    </span>
  
</div>

<div class="mt-1">
  
    
    <span class="post-meta mr-2">
      <i class="iconfont icon-chart"></i>
      1.9k 字
    </span>
  

  
    
    <span class="post-meta mr-2">
      <i class="iconfont icon-clock-fill"></i>
      
      
      25
       分钟
    </span>
  

  
  
</div>


</div>

          
        </div>
      </div>
    </div>
  </header>

  <main>
    
      

<div class="container-fluid">
  <div class="row">
    <div class="d-none d-lg-block col-lg-2"></div>
    <div class="col-lg-8 nopadding-md">
      <div class="container nopadding-md" id="board-ctn">
        <div class="py-5" id="board">
          <article class="post-content mx-auto" id="post">
            <!-- SEO header -->
            <h1 style="display: none">AIRBNB 个性化推荐与信用卡欺诈预测</h1>
            
            <div class="markdown-body" id="post-body">
              <div align='center' ><font size='10'>机器学习-BI</font></div>

<hr>
<div align='center' ><font size='5'>Week_04</font></div>
<div align='center' ><font size='5'>个性化推荐</font></div>

<hr>
<h2 id="1-Airbnb个性化搜索推荐：Real-time-Personalization-using-Embeddings-for-Search-Ranking-at-Airbnb"><a href="#1-Airbnb个性化搜索推荐：Real-time-Personalization-using-Embeddings-for-Search-Ranking-at-Airbnb" class="headerlink" title="1. Airbnb个性化搜索推荐：Real-time Personalization using Embeddings for Search Ranking at Airbnb"></a>1. Airbnb个性化搜索推荐：Real-time Personalization using Embeddings for Search Ranking at Airbnb</h2><h3 id="概述"><a href="#概述" class="headerlink" title="概述"></a><strong>概述</strong></h3><ul>
<li>KDD’2018 Best Paper</li>
<li>Airbnb的一个工业级工作，算法设计和Airbnb自身的业务有比较强的耦合</li>
</ul>
<h3 id="背景"><a href="#背景" class="headerlink" title="背景"></a><strong>背景</strong></h3><p><strong>任务：</strong> Airbnb是一个沟通旅客和房主的短租房中介公司，这个工作主要用在Airbnb的房源搜索排序平台和相似房源推荐平台，99%的预订行为都是发生在这两个平台上的。<br></p>
<p><strong>监督学习 v.s. 无监督学习：</strong>本文使用的是类似word2vec的无监督学习的方式，利用listing的共现关系或user和listing的共现关系训练listing embedding和user embedding（这篇文章里的”listing”指的是搜索/推荐列表里的一个房源）。<br></p>
<p><strong>短期兴趣 v.s. 长期兴趣：</strong>针对用户的短期兴趣和长期兴趣，分别设计了listing embedding和user/listing-type embedding. listing embedding是针对每个listing id的embedding；user/listing-type embedding是将user和listing按一定的规则做聚类，每一个类对应一个embedding，这么做的目的是解决稀疏性问题（顺带也直接解决了冷启动问题）。在Airbnb中，短期兴趣主要来自于用户最近的同城的搜索、点击记录，长期兴趣主要是用户长期的跨城市的使用记录。<br></p>
<h3 id="本文的术语："><a href="#本文的术语：" class="headerlink" title="本文的术语："></a><strong>本文的术语：</strong></h3><p>listing: 搜索或推荐列表中的一个房源 <br><br>market: 房源的一个地理位置属性，一般是一个城市。因为用户在查找房源的时候通常只会在同一个城市之内查找，一个城市就形成一个market<br></p>
<h3 id="listing-embedding"><a href="#listing-embedding" class="headerlink" title="listing embedding"></a><strong>listing embedding</strong></h3><p>数据构建：某个用户按时间的listing点击序列，超过30分钟会被视为是两个序列。<br><br>模型：word2vec的skip-gram模型。几点改进：<br></p>
<ul>
<li>在有预订行为的序列中，所有skip-gram的sliding window都加入最后一个booked listing作为全局信息</li>
<li>随机负例采样之外增加和当前listing在一个market之内的listing作为负例</li>
<li>listing冷启动问题：对于新的listing，通过上传listing时附加的额外信息对应到已有的最接近的3个listing求平均作为新listing的embedding</li>
</ul>
<p><img src="airbnb1.png" srcset="/walker_sue/img/loading.gif"></p>
<h3 id="user-type-embedding-amp-listing-type-embedding问题"><a href="#user-type-embedding-amp-listing-type-embedding问题" class="headerlink" title="user-type embedding &amp; listing-type embedding问题"></a><strong>user-type embedding &amp; listing-type embedding问题</strong></h3><p>利用历史的用户预订信息训练user embedding和listing embedding面临以下问题：</p>
<ul>
<li>预订数据远少于点击数据</li>
<li>很多用户只有一次预订记录，长度为1的预订序列无法学习</li>
<li>通过上下文学习embedding至少需要对应实体出现5-10次，平台上大部分listing被预订的次数太少</li>
<li>用户两次连续的预订之间可能有很长的时间间隔，期间用户的兴趣可能发生变化</li>
</ul>
<h3 id="user-type和listing-type的构建"><a href="#user-type和listing-type的构建" class="headerlink" title="**user-type和listing-type的构建"></a>**user-type和listing-type的构建</h3><ul>
<li>采用特征分桶的方式定义user-type和listing-type的聚类规则</li>
<li>随着时间推移用户可能被落入不同的type中</li>
<li>聚类方法可以顺便处理user和listing的冷启动问题</li>
</ul>
<p><img src="airbnb2.png" srcset="/walker_sue/img/loading.gif"><br><img src="airbnb3.png" srcset="/walker_sue/img/loading.gif"></p>
<h3 id="模型"><a href="#模型" class="headerlink" title="模型"></a><strong>模型</strong></h3><ul>
<li>把user-type和listing-type放在同一个向量空间进行embedding训练</li>
<li>user-type和listing-type在序列中交替排列</li>
</ul>
<p><img src="airbnb4.png" srcset="/walker_sue/img/loading.gif"></p>
<h3 id="应用"><a href="#应用" class="headerlink" title="应用"></a><strong>应用</strong></h3><p><strong>相似房源推荐</strong></p>
<ul>
<li>查找listing embedding距离最近的listing_id</li>
<li>A/B测试表明listing embedding在相似房源推荐上带来了21%的点击率提升</li>
<li>增加了4.9%的用户在相似房源推荐中产生了预订行为</li>
</ul>
<p><strong>房源搜索排序</strong><br><strong>基础排序模型</strong><br>query特征、listing特征以及交叉特征用带Lambda的GBDT计算一个回归问题拟合用户行为分数（曝光但未点击-0分，点击-0.01分，联系房主但未预订-0.25分，预订-1分，房主拒绝预订-0.4分）</p>
<p><strong>listing embedding的应用</strong><br>为每个用户维护一个两周的历史记录，并将历史记录里的listing分成如下6类：</p>
<ul>
<li>点击的listing</li>
<li>长点击的listing: 点击并在页面停留时间超过60秒</li>
<li>曝光但没有点击的listing</li>
<li>收藏的listing</li>
<li>联系了房主但是没有预订的listing</li>
<li>预订的listing</li>
</ul>
<p>搜索排序的时候将候选的listing与6类listing的embedding求相似度得到6个特征加入搜索模型的GBDT. 具体来说，对于每一类的历史listing, 会按照不同的market求平均，当前的候选listing embedding与每个market的平均listing embedding求cosine相似度，将各个market中的最大相似度作为这个类的特征。<br></p>
<h3 id="user-type-amp-listing-type-embedding的应用"><a href="#user-type-amp-listing-type-embedding的应用" class="headerlink" title="user-type &amp; listing-type embedding的应用"></a><strong>user-type &amp; listing-type embedding的应用</strong></h3><p>求当前用户的user-type embedding与候选listing的listing-type embedding的cosine相似度作为特征。</p>
<ul>
<li>embedding相关的特征一览</li>
<li>Coverage: 特征覆盖率</li>
<li>Feature Importance (a/b): 该特征在所有特征（共104个）中的重要性排名</li>
</ul>
<p><img src="airbnb5.png" srcset="/walker_sue/img/loading.gif"></p>
<h3 id="线上结果"><a href="#线上结果" class="headerlink" title="线上结果"></a><strong>线上结果</strong></h3><p>在Airbnb的搜索平台上A/B测试，可以看到在bookings提升的同时，rejections并没有特别大的增长</p>
<p><img src="airbnb6.png" srcset="/walker_sue/img/loading.gif"></p>
<h2 id="2-word2vec-简单代码实现"><a href="#2-word2vec-简单代码实现" class="headerlink" title="2.word2vec 简单代码实现"></a>2.word2vec 简单代码实现</h2><p>参考kaggle中gensim-word2vec-tutorial教程，非常详细易懂。<br><br>教程连接：<a target="_blank" rel="noopener" href="https://www.kaggle.com/pierremegret/gensim-word2vec-tutorial">https://www.kaggle.com/pierremegret/gensim-word2vec-tutorial</a></p>
<pre><code class="hljs python"><span class="hljs-comment"># 常用包加载</span>
<span class="hljs-keyword">import</span> pandas <span class="hljs-keyword">as</span> pd  <span class="hljs-comment"># For data handling</span>
<span class="hljs-keyword">from</span> time <span class="hljs-keyword">import</span> time  <span class="hljs-comment"># To time our operations</span>
<span class="hljs-keyword">from</span> collections <span class="hljs-keyword">import</span> defaultdict  <span class="hljs-comment"># For word frequency</span>

<span class="hljs-keyword">import</span> spacy  <span class="hljs-comment"># For preprocessing</span>

<span class="hljs-keyword">import</span> logging  <span class="hljs-comment"># Setting up the loggings to monitor gensim</span>
logging.basicConfig(<span class="hljs-built_in">format</span>=<span class="hljs-string">&quot;%(levelname)s - %(asctime)s: %(message)s&quot;</span>, datefmt= <span class="hljs-string">&#x27;%H:%M:%S&#x27;</span>, level=logging.INFO)

<span class="hljs-comment"># 数据加载，使用kaggle数据</span>
<span class="hljs-comment"># https://www.kaggle.com/pierremegret/dialogue-lines-of-the-simpsons</span>
df = pd.read_csv(<span class="hljs-string">&quot;D:Desktop/开课吧/NLP/nlp_word2vwc_tutorial/simpsons_dataset.csv&quot;</span>)
df

<span class="hljs-comment"># 缺失数据处理</span>
df = df.dropna().reset_index(drop=<span class="hljs-literal">True</span>)
df.isnull().<span class="hljs-built_in">sum</span>()

<span class="hljs-comment"># INFO - 14:43:11: NumExpr defaulting to 8 threads.</span>
<span class="hljs-comment"># Out[8]:</span>
<span class="hljs-comment"># raw_character_text    0</span>
<span class="hljs-comment"># spoken_words          0</span>
<span class="hljs-comment"># dtype: </span>

nlp = spacy.load(<span class="hljs-string">&#x27;en_core_web_md&#x27;</span>, disable=[<span class="hljs-string">&#x27;ner&#x27;</span>, <span class="hljs-string">&#x27;parser&#x27;</span>]) <span class="hljs-comment"># disabling Named Entity Recognition for speed</span>
<span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">cleaning</span>(<span class="hljs-params">doc</span>):</span>
    <span class="hljs-comment"># Lemmatizes and removes stopwords</span>
    <span class="hljs-comment"># doc needs to be a spacy Doc object</span>
    txt = [token.lemma_ <span class="hljs-keyword">for</span> token <span class="hljs-keyword">in</span> doc <span class="hljs-keyword">if</span> <span class="hljs-keyword">not</span> token.is_stop]
    <span class="hljs-comment"># Word2Vec uses context words to learn the vector representation of a target word,</span>
    <span class="hljs-comment"># if a sentence is only one or two words long,</span>
    <span class="hljs-comment"># the benefit for the training is very small</span>
    <span class="hljs-keyword">if</span> <span class="hljs-built_in">len</span>(txt) &gt; <span class="hljs-number">2</span>:
        <span class="hljs-keyword">return</span> <span class="hljs-string">&#x27; &#x27;</span>.join(txt)

<span class="hljs-comment"># 移除不是单词的一些字母和停顿词</span>
brief_cleaning = (re.sub(<span class="hljs-string">&quot;[^A-Za-z&#x27;]+&quot;</span>, <span class="hljs-string">&#x27; &#x27;</span>, <span class="hljs-built_in">str</span>(row)).lower() <span class="hljs-keyword">for</span> row <span class="hljs-keyword">in</span> df[<span class="hljs-string">&#x27;spoken_words&#x27;</span>])

t = time()
txt = [cleaning(doc) <span class="hljs-keyword">for</span> doc <span class="hljs-keyword">in</span> nlp.pipe(brief_cleaning, batch_size=<span class="hljs-number">5000</span>, n_threads=-<span class="hljs-number">1</span>)]
print(<span class="hljs-string">&#x27;Time to clean up everything: &#123;&#125; mins&#x27;</span>.<span class="hljs-built_in">format</span>(<span class="hljs-built_in">round</span>((time() - t) / <span class="hljs-number">60</span>, <span class="hljs-number">2</span>)))

<span class="hljs-comment"># 去重</span>
df_clean = pd.DataFrame(&#123;<span class="hljs-string">&#x27;clean&#x27;</span>: txt&#125;)
df_clean = df_clean.dropna().drop_duplicates()
df_clean.shape

<span class="hljs-comment"># Bigrams</span>
<span class="hljs-keyword">from</span> gensim.models.phrases <span class="hljs-keyword">import</span> Phrases, Phraser
sent = [row.split() <span class="hljs-keyword">for</span> row <span class="hljs-keyword">in</span> df_clean[<span class="hljs-string">&#x27;clean&#x27;</span>]]
<span class="hljs-comment"># Creates the relevant phrases from the list of sentences:</span>
phrases = Phrases(sent, min_count=<span class="hljs-number">30</span>, progress_per=<span class="hljs-number">10000</span>)
bigram = Phraser(phrases)

<span class="hljs-comment"># 统计出现次数最多的词汇</span>
word_freq = defaultdict(<span class="hljs-built_in">int</span>)
<span class="hljs-keyword">for</span> sent <span class="hljs-keyword">in</span> sentences:
    <span class="hljs-keyword">for</span> i <span class="hljs-keyword">in</span> sent:
        word_freq[i] += <span class="hljs-number">1</span>
<span class="hljs-built_in">len</span>(word_freq)

<span class="hljs-comment"># 训练模型</span>
<span class="hljs-keyword">import</span> multiprocessing
<span class="hljs-keyword">from</span> gensim.models <span class="hljs-keyword">import</span> Word2Vec

cores = multiprocessing.cpu_count() <span class="hljs-comment"># Count the number of cores in a computer</span>
w2v_model = Word2Vec(min_count=<span class="hljs-number">20</span>,
                     window=<span class="hljs-number">2</span>,
                     size=<span class="hljs-number">300</span>,
                     sample=<span class="hljs-number">6e-5</span>, 
                     alpha=<span class="hljs-number">0.03</span>, 
                     min_alpha=<span class="hljs-number">0.0007</span>, 
                     negative=<span class="hljs-number">20</span>,
                     workers=cores-<span class="hljs-number">1</span>)

<span class="hljs-comment"># 词汇表模型构建</span>
t = time()
w2v_model.build_vocab(sentences, progress_per=<span class="hljs-number">10000</span>)
print(<span class="hljs-string">&#x27;Time to build vocab: &#123;&#125; mins&#x27;</span>.<span class="hljs-built_in">format</span>(<span class="hljs-built_in">round</span>((time() - t) / <span class="hljs-number">60</span>, <span class="hljs-number">2</span>)))

<span class="hljs-comment"># 模型训练</span>
t = time()
w2v_model.train(sentences, total_examples=w2v_model.corpus_count, epochs=<span class="hljs-number">30</span>, report_delay=<span class="hljs-number">1</span>)
print(<span class="hljs-string">&#x27;Time to train the model: &#123;&#125; mins&#x27;</span>.<span class="hljs-built_in">format</span>(<span class="hljs-built_in">round</span>((time() - t) / <span class="hljs-number">60</span>, <span class="hljs-number">2</span>)))

<span class="hljs-comment"># 固定参数</span>
w2v_model.init_sims(replace=<span class="hljs-literal">True</span>)

<span class="hljs-comment"># 预测相似词汇</span>
w2v_model.wv.most_similar(positive=[<span class="hljs-string">&quot;homer&quot;</span>])
<span class="hljs-comment"># </span>
<span class="hljs-comment"># [(&#x27;depressed&#x27;, 0.8016997575759888),</span>
<span class="hljs-comment">#  (&#x27;sweetheart&#x27;, 0.7908963561058044),</span>
<span class="hljs-comment">#  (&#x27;marge&#x27;, 0.7905175685882568),</span>
<span class="hljs-comment">#  (&#x27;crummy&#x27;, 0.7774743437767029),</span>
<span class="hljs-comment">#  (&#x27;snuggle&#x27;, 0.7751562595367432),</span>
<span class="hljs-comment">#  (&#x27;rude&#x27;, 0.7597867250442505),</span>
<span class="hljs-comment">#  (&#x27;bongo&#x27;, 0.7355418801307678),</span>
<span class="hljs-comment">#  (&#x27;creepy&#x27;, 0.7337630987167358),</span>
<span class="hljs-comment">#  (&#x27;embarrass&#x27;, 0.7337117195129395),</span>
<span class="hljs-comment">#  (&#x27;wife&#x27;, 0.7327848672866821)]</span>

<span class="hljs-comment"># 预测两个词的相似度</span>
w2v_model.wv.similarity(<span class="hljs-string">&quot;moe&quot;</span>, <span class="hljs-string">&#x27;tavern&#x27;</span>)
<span class="hljs-comment"># </span>
<span class="hljs-comment"># 0.87173784</span>

<span class="hljs-comment">#  推断最不相关的词汇</span>
w2v_model.wv.doesnt_match([<span class="hljs-string">&#x27;jimbo&#x27;</span>, <span class="hljs-string">&#x27;milhouse&#x27;</span>, <span class="hljs-string">&#x27;kearney&#x27;</span>])
<span class="hljs-comment">#</span>
<span class="hljs-comment"># &#x27;milhouse&#x27;</span>

w2v_model.wv.most_similar(positive=[<span class="hljs-string">&quot;woman&quot;</span>, <span class="hljs-string">&quot;homer&quot;</span>], negative=[<span class="hljs-string">&quot;marge&quot;</span>], topn=<span class="hljs-number">3</span>)</code></pre>
<h2 id="3-信用卡违约预测"><a href="#3-信用卡违约预测" class="headerlink" title="3.信用卡违约预测"></a>3.信用卡违约预测</h2><p><img src="fetch1.png" srcset="/walker_sue/img/loading.gif"></p>
<p><img src="fetch2.png" srcset="/walker_sue/img/loading.gif"></p>
<br>

<p>参考资料：</p>
<ul>
<li><a target="_blank" rel="noopener" href="https://blog.csdn.net/da_kao_la/article/details/105798365">Airbnb个性化搜索推荐</a></li>
</ul>

            </div>
            <hr>
            <div>
              <div class="post-metas mb-3">
                
                  <div class="post-meta mr-3">
                    <i class="iconfont icon-category"></i>
                    
                      <a class="hover-with-bg" href="/walker_sue/categories/%E6%9C%BA%E5%99%A8%E5%AD%A6%E4%B9%A0/">机器学习</a>
                    
                      <a class="hover-with-bg" href="/walker_sue/categories/%E6%9C%BA%E5%99%A8%E5%AD%A6%E4%B9%A0/%E4%B8%AA%E6%80%A7%E5%8C%96%E6%8E%A8%E8%8D%90/">个性化推荐</a>
                    
                  </div>
                
                
                  <div class="post-meta">
                    <i class="iconfont icon-tags"></i>
                    
                      <a class="hover-with-bg" href="/walker_sue/tags/BI/">BI</a>
                    
                      <a class="hover-with-bg" href="/walker_sue/tags/%E6%9C%BA%E5%99%A8%E5%AD%A6%E4%B9%A0/">机器学习</a>
                    
                      <a class="hover-with-bg" href="/walker_sue/tags/%E6%8E%A8%E8%8D%90%E7%AE%97%E6%B3%95/">推荐算法</a>
                    
                  </div>
                
              </div>
              
                <p class="note note-warning">本博客所有文章除特别声明外，均采用 <a target="_blank" href="https://creativecommons.org/licenses/by-sa/4.0/deed.zh" rel="nofollow noopener noopener">CC BY-SA 4.0 协议</a> ，转载请注明出处！</p>
              
              
                <div class="post-prevnext row">
                  <article class="post-prev col-6">
                    
                    
                      <a href="/walker_sue/2021/02/26/week5-DIEN/">
                        <i class="iconfont icon-arrowleft"></i>
                        <span class="hidden-mobile">淘宝定向广告演化和天池天猫复购预测</span>
                        <span class="visible-mobile">Vorheriger</span>
                      </a>
                    
                  </article>
                  <article class="post-next col-6">
                    
                    
                      <a href="/walker_sue/2021/01/28/week3-wordtoken/">
                        <span class="hidden-mobile">新闻自动化处理（一）</span>
                        <span class="visible-mobile">Nächster</span>
                        <i class="iconfont icon-arrowright"></i>
                      </a>
                    
                  </article>
                </div>
              
            </div>

            
          </article>
        </div>
      </div>
    </div>
    
      <div class="d-none d-lg-block col-lg-2 toc-container" id="toc-ctn">
        <div id="toc">
  <p class="toc-header"><i class="iconfont icon-list"></i>&nbsp;TOC</p>
  <div id="tocbot"></div>
</div>

      </div>
    
  </div>
</div>

<!-- Custom -->


    
  </main>

  
    <a id="scroll-top-button" href="#" role="button">
      <i class="iconfont icon-arrowup" aria-hidden="true"></i>
    </a>
  

  
    <div class="modal fade" id="modalSearch" tabindex="-1" role="dialog" aria-labelledby="ModalLabel"
     aria-hidden="true">
  <div class="modal-dialog modal-dialog-scrollable modal-lg" role="document">
    <div class="modal-content">
      <div class="modal-header text-center">
        <h4 class="modal-title w-100 font-weight-bold">Suchen</h4>
        <button type="button" id="local-search-close" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">&times;</span>
        </button>
      </div>
      <div class="modal-body mx-3">
        <div class="md-form mb-5">
          <input type="text" id="local-search-input" class="form-control validate">
          <label data-error="x" data-success="v"
                 for="local-search-input">Stichwort</label>
        </div>
        <div class="list-group" id="local-search-result"></div>
      </div>
    </div>
  </div>
</div>
  

  

  <footer class="text-center mt-5 py-3">
  <div class="footer-content">
     <a href="https://hexo.io" target="_blank" rel="nofollow noopener"><span>Hexo</span></a> <i class="iconfont icon-love"></i> <a href="https://github.com/fluid-dev/hexo-theme-fluid" target="_blank" rel="nofollow noopener"><span>Fluid</span></a> 
  </div>
  

  

  
</footer>

<!-- SCRIPTS -->
<script  src="https://cdn.staticfile.org/jquery/3.4.1/jquery.min.js" ></script>
<script  src="https://cdn.staticfile.org/twitter-bootstrap/4.4.1/js/bootstrap.min.js" ></script>
<script  src="/walker_sue/js/debouncer.js" ></script>
<script  src="/walker_sue/js/main.js" ></script>

<!-- Plugins -->


  
    <script  src="/walker_sue/js/lazyload.js" ></script>
  



  



  <script defer src="https://cdn.staticfile.org/clipboard.js/2.0.6/clipboard.min.js" ></script>
  <script  src="/walker_sue/js/clipboard-use.js" ></script>







  <script  src="https://cdn.staticfile.org/tocbot/4.11.1/tocbot.min.js" ></script>
  <script>
    $(document).ready(function () {
      var boardCtn = $('#board-ctn');
      var boardTop = boardCtn.offset().top;

      tocbot.init({
        tocSelector: '#tocbot',
        contentSelector: '#post-body',
        headingSelector: 'h1,h2,h3,h4,h5,h6',
        linkClass: 'tocbot-link',
        activeLinkClass: 'tocbot-active-link',
        listClass: 'tocbot-list',
        isCollapsedClass: 'tocbot-is-collapsed',
        collapsibleClass: 'tocbot-is-collapsible',
        collapseDepth: 0,
        scrollSmooth: true,
        headingsOffset: -boardTop
      });
      if ($('.toc-list-item').length > 0) {
        $('#toc').css('visibility', 'visible');
      }
    });
  </script>



  <script  src="https://cdn.staticfile.org/typed.js/2.0.11/typed.min.js" ></script>
  <script>
    function typing(id, title){
        var typed = new Typed('#' + id, {
            strings: [
              '  ',
              title + "&nbsp;",
            ],
            cursorChar: "_",
            typeSpeed: 70,
            loop: false,
        });
        typed.stop();
        $(document).ready(function () {
            $(".typed-cursor").addClass("h2");
            typed.start();
        });
    }
    
        typing("subtitle", "AIRBNB 个性化推荐与信用卡欺诈预测")
    
  </script>


  <script  src="https://cdn.staticfile.org/anchor-js/4.2.2/anchor.min.js" ></script>
  <script>
    anchors.options = {
      placement: "right",
      visible: "hover",
      
    };
    var el = "h1,h2,h3,h4,h5,h6".split(",");
    var res = [];
    for (item of el) {
      res.push(".markdown-body > " + item)
    }
    anchors.add(res.join(", "))
  </script>



  <script  src="/walker_sue/js/local-search.js" ></script>
  <script>
    var path = "/walker_sue/local-search.xml";
    var inputArea = document.querySelector("#local-search-input");
    inputArea.onclick = function () {
      searchFunc(path, 'local-search-input', 'local-search-result');
      this.onclick = null
    }
  </script>



  <script  src="https://cdn.staticfile.org/fancybox/3.5.7/jquery.fancybox.min.js" ></script>
  <link  rel="stylesheet" href="https://cdn.staticfile.org/fancybox/3.5.7/jquery.fancybox.min.css" />

  <script>
    $('#post img:not(.no-zoom img, img[no-zoom]), img[zoom]').each(
      function () {
        var element = document.createElement('a');
        $(element).attr('data-fancybox', 'images');
        $(element).attr('href', $(this).attr('src'));
        $(this).wrap(element);
      }
    );
  </script>





  

  
    <!-- MathJax -->
    <script>
      MathJax = {
        tex: {
          inlineMath: [['$', '$'], ['\\(', '\\)']]
        },
        options: {
          renderActions: {
            findScript: [10, doc => {
              document.querySelectorAll('script[type^="math/tex"]').forEach(node => {
                const display = !!node.type.match(/; *mode=display/);
                const math = new doc.options.MathItem(node.textContent, doc.inputJax[0], display);
                const text = document.createTextNode('');
                node.parentNode.replaceChild(text, node);
                math.start = { node: text, delim: '', n: 0 };
                math.end = { node: text, delim: '', n: 0 };
                doc.math.push(math);
              });
            }, '', false],
            insertedScript: [200, () => {
              document.querySelectorAll('mjx-container').forEach(node => {
                let target = node.parentNode;
                if (target.nodeName.toLowerCase() === 'li') {
                  target.parentNode.classList.add('has-jax');
                }
              });
            }, '', false]
          }
        }
      };
    </script>

    <script async src="https://cdn.staticfile.org/mathjax/3.0.5/es5/tex-svg.js" ></script>

  











</body>
</html>
